package com.cccyy.multi_thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExecutorsTest {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        int count = 100;
        for (int i = 0; i < count; i++) {
            System.out.println("执行任务编号：" + i);
            executorService.execute(new Runnable() {
                @Override
                public void run() {
                    System.out.println("举例：执行了某个接口调用任务");
                }
            });
        }
        executorService.shutdown();
    }
}
